-- GENERATED SPELL FOR [Thunderhawk Hatchling] --


function spell0_3247(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3247', 3000, 1)
end

function spell1_3247(pUnit, Event) --@Lightning Shield,Self--
pUnit:FullCastSpellOnTarget(325,pUnit)
pUnit:RegisterEvent('Sorts_3247', 664, 1)
end

function Sorts_3247(pUnit, Event)
local choix_sorts_3247 = math.random(0, 1)
if choix_sorts_3247 == 0 then
pUnit:RegisterEvent('spell0_3247', 1, 1)
end
if choix_sorts_3247 == 1 then
pUnit:RegisterEvent('spell1_3247', 1, 1)
end
end

function mob3247_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3247', math.random(1500, 3000), 1)
end

function mob3247_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3247_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3247_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3247, 1, 'mob3247_Action')
RegisterUnitEvent(3247, 2, 'mob3247_Leave')
RegisterUnitEvent(3247, 3, 'mob3247_Kill')
RegisterUnitEvent(3247, 4, 'mob3247_Die')
